package cn.com.api.mapper.base;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.*;

import cn.com.api.entity.ApiT_order_return;

//DAO
public interface T_order_returnMapperBase {

	// 根据id查看
	@Select("SELECT * FROM T_ORDER_RETURN  WHERE ID = #{id}")
	public ApiT_order_return findT_order_returnById(Integer id);

	// 查看数据集
	@Select("SELECT * FROM T_order_return")
	public List<ApiT_order_return> findT_order_returns();

	// 根据条件查看数据集
	public List<Map<String, Object>> findT_order_returnsByMap(HashMap condition);

	// 添加
	@Insert("INSERT INTO T_ORDER_RETURN (USER_ID, ORDER_ID, CREATE_DATE, GOODS_ID, PRODUCT_ID, RETURN_MONEY, RETURN_NAME, RETURN_REASON, RETURN_PHONE, REASON, DUTY, MONEY, CHECK_TIME, IMG_1, IMG_2, IMG_3, STATUS, EXT_1, EXT_2, EXT_3, EXT_4, EXT_5) VALUES (#{user_id,jdbcType=VARCHAR}, #{order_id,jdbcType=VARCHAR}, #{create_date,jdbcType=VARCHAR}, #{goods_id,jdbcType=VARCHAR}, #{product_id,jdbcType=VARCHAR}, #{return_money,jdbcType=NUMERIC}, #{return_name,jdbcType=VARCHAR}, #{return_reason,jdbcType=VARCHAR}, #{return_phone,jdbcType=VARCHAR}, #{reason,jdbcType=VARCHAR}, #{duty,jdbcType=VARCHAR}, #{money,jdbcType=NUMERIC}, #{check_time,jdbcType=VARCHAR}, #{img_1,jdbcType=VARCHAR}, #{img_2,jdbcType=VARCHAR}, #{img_3,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{ext_1,jdbcType=VARCHAR}, #{ext_2,jdbcType=VARCHAR}, #{ext_3,jdbcType=VARCHAR}, #{ext_4,jdbcType=VARCHAR}, #{ext_5,jdbcType=VARCHAR})")
	@Options(useGeneratedKeys = true, keyProperty = "id")
	public int insertT_order_return(ApiT_order_return t_order_return);

	// 修改
	@Update("UPDATE T_ORDER_RETURN SET USER_ID = #{user_id}, ORDER_ID = #{order_id}, CREATE_DATE = #{create_date}, GOODS_ID = #{goods_id}, PRODUCT_ID = #{product_id}, RETURN_MONEY = #{return_money}, RETURN_NAME = #{return_name}, RETURN_REASON = #{return_reason}, RETURN_PHONE = #{return_phone}, REASON = #{reason}, DUTY = #{duty}, MONEY = #{money}, CHECK_TIME = #{check_time}, IMG_1 = #{img_1}, IMG_2 = #{img_2}, IMG_3 = #{img_3}, STATUS = #{status}, EXT_1 = #{ext_1}, EXT_2 = #{ext_2}, EXT_3 = #{ext_3}, EXT_4 = #{ext_4}, EXT_5 = #{ext_5} WHERE ID = #{id}")
	public int updateT_order_return(ApiT_order_return t_order_return);

	// 删除
	@Delete("DELETE FROM T_ORDER_RETURN  WHERE ID = #{id}")
	public int deleteT_order_return(Integer id);

	// Foreign keys revelant

	// region Indexs revelant

}
